Skip to content

add consumer group service method to SidecarHandle and associated loader utils#3261

Merged
Dave Shoup (shouples) merged 4 commits intomainfrom
djs/fetch-consumer-groups
Feb 19, 2026
Merged

add consumer group service method to SidecarHandle and associated loader utils#3261
Dave Shoup (shouples) merged 4 commits intomainfrom
djs/fetch-consumer-groups

Conversation

@shouples
Copy link
Contributor

@shouples Dave Shoup (shouples) commented Feb 7, 2026

Summary of Changes

No functional changes here, just prep work for downstream branches.

Note that the new fetchConsumerGroup*() functions aren't actually used until #3264, but were included since they are the only (initial) callers to the new getConsumerGroupV3Api service method.

Closes #3228, closes #3229

Associated PRs

Pull request checklist

Please check if your PR fulfills the following (if applicable):

Tests

  • Added new
  • Updated existing
  • Deleted existing

Release notes

  • Does anything in this PR need to be mentioned in the user-facing CHANGELOG?

@airlock-confluentinc airlock-confluentinc bot force-pushed the djs/fetch-consumer-groups branch from eefd751 to ddae88c Compare February 19, 2026 18:50
@shouples Dave Shoup (shouples) marked this pull request as ready for review February 19, 2026 19:07
@shouples Dave Shoup (shouples) requested a review from a team as a code owner February 19, 2026 19:07
Copilot AI review requested due to automatic review settings February 19, 2026 19:07
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds foundational support for consumer groups in the VS Code extension by introducing a new service method and utility functions. It's part of a stacked PR series (PRs #3261-3264) building toward displaying consumer groups in the Topics view.

Changes:

  • Adds getConsumerGroupV3Api method to SidecarHandle for creating consumer group API clients
  • Adds fetchConsumerGroups utility function to fetch all consumer groups for a Kafka cluster
  • Adds fetchConsumerGroupMembers utility function to fetch members/consumers of a specific consumer group
  • Includes comprehensive unit tests for the new utility functions

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/sidecar/sidecarHandle.ts Adds getConsumerGroupV3Api service method following the exact pattern of similar methods like getTopicV3Api and getPartitionV3Api
src/loaders/utils/loaderUtils.ts Implements fetchConsumerGroups and fetchConsumerGroupMembers utility functions with proper logging, following patterns established by fetchSubjects
src/loaders/utils/loaderUtils.test.ts Adds comprehensive test coverage for both new utility functions, including happy path and empty result edge cases

createTestTopicData(TEST_LOCAL_KAFKA_CLUSTER.id, "topic3", ["READ", "WRITE"]),
createTestTopicData(TEST_LOCAL_KAFKA_CLUSTER.id, "topic4", ["READ", "WRITE"]),
];
// required for ConsumerGroupData/ConsumerGroupDataList but will be unused in the associated tests
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

});

it("should return a ConsumerGroupData array from listKafkaConsumerGroups", async () => {
const testGroups: ConsumerGroupData[] = [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: move this and testConsumers to describe block in anticipation of more tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about it, but we just have the two tests per helper function (one with data, one with no data). We'll definitely reuse some of the internal models for consumer groups and need to set those in the describe blocks of future branches' tests, but for now there aren't any other tests that need 'em. If we do get to that point, should be easy enough in any future branch to promote these to the describe-block level.

@sonarqube-confluent
Copy link

@shouples Dave Shoup (shouples) merged commit c79864e into main Feb 19, 2026
14 checks passed
@shouples Dave Shoup (shouples) deleted the djs/fetch-consumer-groups branch February 19, 2026 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add base loader method for listing consumer groups Add getConsumerGroupV3Api service class method to sidecar handle

3 participants